<script setup lang="ts">
const tableData = [
  {
    date: "2016-05-03",
    name: "Tom",
    address: "No. 189, Grove St, Los Angeles",
  },
  {
    date: "2016-05-02",
    name: "Tom",
    address: "No. 189, Grove St, Los Angeles",
  },
  {
    date: "2016-05-04",
    name: "Tom",
    address: "No. 189, Grove St, Los Angeles",
  },
  {
    date: "2016-05-01",
    name: "Tom",
    address: "No. 189, Grove St, Los Angeles",
  },
];
</script>

<template>
  <div class="container">
    <el-table :data="tableData" stripe style="width: 100%">
      <el-table-column prop="date" label="Date" min-width="30%" />
      <el-table-column prop="name" label="Name" min-width="20%" />
      <el-table-column prop="address" label="Address" />
    </el-table>
  </div>
</template>

<style lang="less" scoped>
.container {
  width: 100%;
  height: 100%;
  .el-table {
    width: 100%;
    height: 100%;
    font-size: 1.2rem;
    box-sizing: border-box;
    background-color: transparent !important;
    :deep(.el-table__cell) {
      color: aliceblue;
      background-color: transparent;
    }
    // 将el-table的单元格改为content-box，以避免在7680*3240时显示不全
    :deep(.cell) {
      box-sizing: content-box;
    }

    :deep(tr) {
      background-color: transparent !important;
      // pointer-events: none;

      th {
        text-align: center;
        // pointer-events: none;
      }

      td {
        text-align: center;
        padding: 0.1rem !important;
        // pointer-events: none;
      }
    }
  }
}

:deep(.el-table--enable-row-hover .el-table__body tr:hover > td) {
  background-color: transparent !important;
}
:deep(.el-table--enable-row-hover .el-table__body .el-table__row--striped:hover > td) {
  background-color: @stripedBGColor !important;
}
:deep(.el-table__row--striped td) {
  background-color: @stripedBGColor !important;
}
</style>
